<?php

namespace App\Http\MiddLeware;
use Closure;
use Auth;

class UsersMiddLeware
{
    /**
     * Handle an incoming request.
     * 退出登录
     * @author yhs 2019.07.25
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {   
        if(!Auth::guard('user')->check()){
            return redirect('/home/login');
        }
        return $next($request);
    }
}
